package mq.cinrad.kafka.app.producer;

import org.springframework.kafka.core.KafkaTemplate;

public class FileActionCallbackFactory {

	// 静态工厂方法
	public static FileActionCallback getFileActionCallback(KafkaTemplate<String, String> template,
			KafkaWatchFileFilter filter) {
		FileActionCallback callback = null;
		switch (filter.getKafkaWatchFileConfig().getFileActionCallbackName()) {
		case "HttpFileActionCallback":
			callback = new HttpFileActionCallback(template, filter);
			break;
		default:
			callback = new HttpFileActionCallback(template, filter);
			break;
		}

		return callback;
	}

}
